package com.jason.controller;

import com.jason.base.BaseProcess;
import com.jason.service.ISysPermissionService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.*;

/**
 * <p>
 * ${table.comment}  前端控制器
 * </p>
 *
 * @author sj
 * @since 2018-04-25
 */
@RestController
@RequestMapping("/sysPermission")
@Api(value = "权限接口", description = "权限接口")
public class SysPermissionController {

    @Autowired
    ISysPermissionService iSysPermissionService;

    @ApiOperation(value = "查询用户菜单", notes = "查询用户菜单",  produces = MediaType.APPLICATION_JSON_VALUE)
    @GetMapping(value = "selectMenusByUser")
    public Object selectMenusByUser(){
        return BaseProcess.setSuccessResult(iSysPermissionService.selectMenusByUser(iSysPermissionService.getCurrentUserId()));
    }

}
